import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SMiniGuildInfo } from "./SMiniGuildInfo";
type int = number;
//class SMyGuildUnion
    
    export  class SMyGuildUnion extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SMyGuildUnion();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.firstGuildInfo.__write(arg1);
            arg1.writeInt(this.firstAllocation);
            this.secondGuildInfo.__write(arg1);
            arg1.writeInt(this.secondAllocation);
            arg1.writeInt(this.secondStatus);
            this.thirdGuildInfo.__write(arg1);
            arg1.writeInt(this.thirdAllocation);
            arg1.writeInt(this.thirdStatus);
            arg1.writeDate(this.startDt);
            arg1.writeDate(this.endDt);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.firstGuildInfo = new SMiniGuildInfo();
            this.firstGuildInfo.__read(arg1);
            this.firstAllocation = arg1.readInt();
            this.secondGuildInfo = new SMiniGuildInfo();
            this.secondGuildInfo.__read(arg1);
            this.secondAllocation = arg1.readInt();
            this.secondStatus = arg1.readInt();
            this.thirdGuildInfo = new SMiniGuildInfo();
            this.thirdGuildInfo.__read(arg1);
            this.thirdAllocation = arg1.readInt();
            this.thirdStatus = arg1.readInt();
            this.startDt = arg1.readDate();
            this.endDt = arg1.readDate();
            return;
        }

        public /* const */_type: int=12112;

        public /* var */firstGuildInfo: SMiniGuildInfo;

        public /* var */firstAllocation: int;

        public /* var */secondGuildInfo: SMiniGuildInfo;

        public /* var */secondAllocation: int;

        public /* var */secondStatus: int;

        public /* var */thirdGuildInfo: SMiniGuildInfo;

        public /* var */thirdAllocation: int;

        public /* var */thirdStatus: int;

        public /* var */startDt: Date;

        public /* var */endDt: Date;

        public static /* var */_regist: SMyGuildUnion;
    }

            SMyGuildUnion._regist = new SMyGuildUnion(true);
        